//
//  XLHistoryModel.m
//  History
//
//  Created by 于鹏 on 2017/9/4.
//  Copyright © 2017年 YIVIEW. All rights reserved.
//

#import "XLHistoryModel.h"

@implementation XLHistoryModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"gender":@[@"gender",@"SexType"],
             @"age":@[@"age",@"PatientAge"],
             @"comingMethod":@[@"comingMethod",@"ComingMethod"],
             @"firstAidType":@[@"firstAidType",@"FirstAidType"],
             @"morbidityTime":@[@"morbidityTime",@"MorbidityTime"]};
}

- (NSString *)PatientName {
    return [self judgeValue:_PatientName];
}

- (NSString *)age {
    return [self judgeValue:_age];
}

- (NSString *)gender {
    return [self judgeValue:_gender];
}

- (NSString *)firstAidType {
    return [self judgeValue:_firstAidType];
}

- (NSString *)morbidityTime {
    return [self judgeValue:_morbidityTime];
}

- (NSString *)hospital {
    return [self judgeValue:_hospital];
}

- (NSString *)doctorName {
    return [self judgeValue:_doctorName];
}


- (NSString *)judgeValue:(NSString *)value {
    if ([value isKindOfClass:[NSNull class]] || value == nil) {
        return @"";
    } else {
        return value;
    }
}
@end
